package com.leisai.manager.dao;

import com.leisai.manager.pojo.SalesData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SalesDataMapper {
    int deleteByPrimaryKey(Integer data_id);

    int insert(SalesData record);

    int insertSelective(SalesData record);

    SalesData selectByPrimaryKey(Integer data_id);

    SalesData selectByAttr(SalesData record);

    int updateByPrimaryKeySelective(SalesData record);

    int updateByPrimaryKey(SalesData record);

    /**
     * 将行业初始化到销售数据表中
     * @param year
     * @return
     */
    int initSaleData(String year);

    /**
     * 获的行业数据合计
     * @param industryIds
     * @return
     */
    SalesData getCombinedDate(@Param("list") List<Integer> industryIds,@Param("year")String year);
}